﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using SERP.StringMappings;
using SERP.DAO;
using SERP.Controllers;
namespace SERP.Modules.WorkPositions{
	public partial class WorkPositionsInputFields : SERP.Modules.ModuleBase
	{
		protected void Page_Load(object sender, EventArgs e){
			LoadLanguage();
		}
		private WorkPositionsEntity model=new WorkPositionsEntity();
		public WorkPositionsEntity Model{
			set{
				model=value;
			}
			get{
				return model;
			}
		}
		//Load All lable text
		private void LoadLanguage(){
			labelPosName.Text=WorkPositionsStringMapping.PosName+":";
			labelNote.Text=WorkPositionsStringMapping.Note+":";
			labelBinaryId.Text=WorkPositionsStringMapping.BinaryId+":";
			validRQBinaryId.ErrorMessage=SERP.Constants.APP_REQUIRE_WARNING;
		}   
		public void UpdateToModel(){
			model.PosName=Convert.ToString(txtPosName.Text);
			model.Note=Convert.ToString(txtNote.Text);
			//model.BinaryId=Convert.ToInt32(txtBinaryId.SelectedValue);
		}
		public void UpdateToScreen(){
			txtPosName.Text=model.PosName;
			txtNote.Text=model.Note;
		}
		public void ClearScreen(){
			txtPosName.Text="";
			txtNote.Text="";
		}
		public bool ValidateScreen(){
			bool result=true;
			
			return result;
		}	
	}
}
